home *** CD-ROM | disk | FTP | other *** search
- regc4f( 5, %daycolor_r, %daycolor_g, %daycolor_b, %sunvisibility )
- regc4f( 7, %ambient_r, %ambient_g, %ambient_b, %ambient_a )
- pshader("
-
- ps_1_4
-
- def c4, 0.02, 0.0, 0.0, 0.02
-
- texcrd r0.rg, t0_dw.xyw
- texld r1, t1 ;noise1
- texld r2, t2 ;noise2
-
-
- mul_sat r1, r1, r2
-
- mad_sat r3, r1.r, c4.r, r0.r
- mad_sat r3, r1.g, c4.g, r3.r
- mad_sat r3.g, r1.r, c4.b, r0.g
- mad_sat r3.g, r1.g, c4.a, r3.g
-
-
- phase
-
- texld r0, r3 ;reflection
- texld r1, t1 ;noise1
- texld r2, t2 ;noise2
- texld r3, t3 ;A: clouds inverted shadows
- texld r4, t4 ;A: static shadows
- texld r5, t5 ;specular
-
-
- add_sat r1.rgb, r1.a, r2.a ;creating noise
- +mul_sat r3.a, r4.a, 1-r3.a ;A: clouds shadow * static shadows
-
- mul_sat r5.rgb, r5.a, 1-r1 ;applying noise to specular
- +mad_sat r4.a, r3.a, c7.b, c7.a ;A: applying ambient
-
- mul_sat r5.rgb, r5, c5 ;daycolor to specular
- +mul_sat r3.a, r3.a, c5.a ;A: applying sun visibility to shadows
-
- mul_sat r5, r5, r3.a ;applying shadows to specular
-
- mad_sat r0, r0, r4.a, r5 ;applying shadows and specular to reflection
-
-
- ")
-
-
-
-